import { IsString, IsNumber, IsOptional, IsArray, ArrayMaxSize, MaxLength, IsBoolean } from 'class-validator';
import PaginationDto from '../../dtos/pagination.dto';

export default class Dto {
    @MaxLength(50)
    @IsString({})
    @IsOptional()
    name:string;

    @IsNumber({})
    @IsOptional()
    slowPricing:number;


    @IsNumber({})
    @IsOptional()
    fastPricing:number;

    @MaxLength(10)
    @IsString({})
    @IsOptional()
    leader:string;

    @MaxLength(11)
    @IsString({})
    @IsOptional()
    tel:string;


    @IsNumber({})
    @IsOptional()
    longitude:number;


    @IsNumber({})
    @IsOptional()
    latitude:number;

    @MaxLength(100)
    @IsString({})
    @IsOptional()
    address:string;

    @ArrayMaxSize(5)
    @IsArray({})
    @IsOptional()
    pics:string[];

    @ArrayMaxSize(20)
    @IsArray({})
    @IsOptional()
    labels:string[];

    
    @IsString({})
    @IsOptional()
    desc:string;
}

export class AddDto extends Dto {
    
}




export class UpdateDto extends Dto {
    
}

export class PageDto extends PaginationDto {
    
    @MaxLength(30)
    @IsString({})
    @IsOptional()
    name:string;

}
